package com.mygdx.game.Stage;


import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
import com.badlogic.gdx.scenes.scene2d.Stage;
import com.badlogic.gdx.scenes.scene2d.ui.Image;
import com.mygdx.game.Scenes.ActiveCharacter;

public class AttackStage1 extends Stage {
    ActiveCharacter activeCharacter;
    Texture texture;
    TextureRegion attackRegon;
    Image attackBackground;

    private String background;

    public AttackStage1(String background) {
        super();
        this.background = background;
        init();
    }

    private void init() {
        activeCharacter = new ActiveCharacter("Character/A",500,-100);
        activeCharacter.setSize(65,64);

        texture = new Texture(Gdx.files.internal(background)); //"GroupProject/image/story.png"
        if (activeCharacter.getY()==-100){
            attackRegon = new TextureRegion(texture, 0, 600, 480, 600);
        }
        else {
            attackRegon = new TextureRegion(texture, 0, 0, 480, 600);
        }
        attackBackground = new Image(attackRegon);
        attackBackground.setSize(1920, 1080);



        this.addActor(attackBackground);
        this.addActor(activeCharacter);




    }
}
